import tableServiceAbstract from "@/core/table/tableService.interface";
import { $productAdd, $productDel, $productEidt, $productGetList } from "@/api/productList/productList";
export default class productListService implements tableServiceAbstract {
  getTable(): Promise<any> {
    return $productGetList();
  }
  delete(params: any): Promise<any> {
    return $productDel({id:params[0]});
  }
  add(params: any): Promise<any> {
    return $productAdd(params);
  }
  edit(params: any): Promise<any> {
    return $productEidt(params);
  }
  detail(params: any): Promise<any> {
    return new Promise((resolve) => {
      resolve({
        data: {
          code: 200,
          data: {},
          msg: 'success',
        }
      });
    })
  }
}